<?php

namespace App\Models\Finance;

use App\Models\BaseModel;
use App\Models\Music\Music;

/**
 * 补差管理
 *
 * Class Repair
 * @package App\Models\Finance
 */
class IncomeExcel extends BaseModel
{
    /**
     * The table associated with the model.
     *
     * @var string
     */
    public $table = 'income_excel';
    public $dates = [];
    /**
     * Indicates if the model should be timestamped.
     * @var bool
     */
    public $timestamps = false;


    public function user(){
        return $this->belongsTo('App\Models\User\UsersInfo','user_id', 'id')->select('real_name','id','money');
    }

    public function agent()
    {
        return $this->belongsTo('App\Models\Agent\Agent', 'agent_id', 'id')->select('simple_name', 'id', 'money', 'scale', 'user_name', 'full_name', 'band_card');
    }
    public function usersInfo()
    {
        return $this->belongsTo('App\Models\User\UsersInfo', 'user_id', 'id');
    }

    public function income()
    {
        return $this->belongsTo('App\Models\Finance\Income', 'income_id', 'id');
    }

}
